package com.unknowpupil.design.observer;

/**
 * @Description: <p>
 *  具体子类
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/28 16:29
 * @Classname: ConcreteSubject
 * @Version: 1.0
 */
public class ConcreteSubject extends Subject {
    private int state;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
        //主题对象发生变化通知所有观察者
        this.notifyAllObservers();

    }
}
